package org.lop.functional.system.service;

import org.lop.functional.system.domain.SysUser;
import org.lop.functional.system.repository.SysUserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class SysUserService {

	@Autowired
	private SysUserRepository sysUserRepository;

	@Transactional
	public void save( SysUser entity ) {
		this.sysUserRepository.save( entity );
	}

	public Page<SysUser> findPage( Pageable pageable ) {
		return this.sysUserRepository.getAll( pageable );
	}

}